import time
import ntplib

client = ntplib.NTPClient()
res = client.request('pool.ntp.org')
tStr = time.localtime(res.tx_time)
date_str = time.strftime("%Y-%m-%d", tStr)
time_str = time.strftime("%H:%M:%S", tStr)
print(tStr)
print(date_str)
print(time_str)
